public class Demo16 {
    public static void main(String[] args) {
        String s1 = null;
        if (s1 != null && s1.equals("hello")) {
            System.out.println("hello");
        }
        if ("hello".equals(s1)){
            System.out.println("hello");
        }
    }
}
